package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 巡查记录表
 *
 * @author code-generate
 * @date 2022-02-27
 */
@Data
@DbTable(tableName = "t_gre_tree_patrol_log")
public class GreTreePatrolLog extends BaseEntity {
        /**
     * 树木编号
     */
    @DbTableField(columnName = "c_code", dbType = DbTypeEnum.VARCHAR)
    public String code ;

    /**
     * 树木ID
     */
    @DbTableField(columnName = "c_tree_id", dbType = DbTypeEnum.INTEGER)
    public Integer treeId ;

    /**
     * 巡查时间
     */
    @DbTableField(columnName = "c_patrol_time", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime patrolTime ;

    /**
     * 巡查人ID
     */
    @DbTableField(columnName = "c_user_id", dbType = DbTypeEnum.VARCHAR)
    public String userId ;

    /**
     * 巡查人名称
     */
    @DbTableField(columnName = "c_user_name", dbType = DbTypeEnum.VARCHAR)
    public String userName ;

    /**
     * 内容
     */
    @DbTableField(columnName = "c_content", dbType = DbTypeEnum.VARCHAR)
    public String content ;

    /**
     * 状态（1-正常，2-异常）
     */
    @DbTableField(columnName = "c_status", dbType = DbTypeEnum.INTEGER)
    public Integer status ;

    /**
     * 备注
     */
    @DbTableField(columnName = "c_remark", dbType = DbTypeEnum.VARCHAR)
    public String remark ;

    @ApiModelProperty(value = "附件")
    private List<GreTreePatrolLogFile> fileList;
}
